package com.mingda.weathermagiccenter.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 组织机构
 * @TableName ws_equisurface_org
 */
@TableName(value ="ws_equisurface_org")
@Data
public class WsEquisurfaceOrg implements Serializable {
    /**
     * 机构编码
     */
    @TableId(value = "orgid")
    private String orgid;

    /**
     * 机构名称
     */
    @TableField(value = "orgname")
    private String orgname;

    /**
     * 1 在用 0 失效
     */
    @TableField(value = "flag")
    private String flag;

    /**
     * 机构geom
     */
    @TableField(value = "org_geom")
    private String orgGeom;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WsEquisurfaceOrg other = (WsEquisurfaceOrg) that;
        return (this.getOrgid() == null ? other.getOrgid() == null : this.getOrgid().equals(other.getOrgid()))
            && (this.getOrgname() == null ? other.getOrgname() == null : this.getOrgname().equals(other.getOrgname()))
            && (this.getFlag() == null ? other.getFlag() == null : this.getFlag().equals(other.getFlag()))
            && (this.getOrgGeom() == null ? other.getOrgGeom() == null : this.getOrgGeom().equals(other.getOrgGeom()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOrgid() == null) ? 0 : getOrgid().hashCode());
        result = prime * result + ((getOrgname() == null) ? 0 : getOrgname().hashCode());
        result = prime * result + ((getFlag() == null) ? 0 : getFlag().hashCode());
        result = prime * result + ((getOrgGeom() == null) ? 0 : getOrgGeom().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orgid=").append(orgid);
        sb.append(", orgname=").append(orgname);
        sb.append(", flag=").append(flag);
        sb.append(", orgGeom=").append(orgGeom);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}